package One;

import java.util.Iterator;
import java.util.Set;
import java.util.TreeSet;

public class TreeSet2 {

	public static void main(String[] args) {
		Set<Dog> a = new TreeSet(new Rules());
		a.add(new Dog("xx","zz"));
		a.add(new Dog("xx","ii"));
		a.add(new Dog("xx","tt"));
		a.add(new Dog("xx","ff"));
		Iterator<Dog> it=a.iterator();
		while(it.hasNext()){
			it.next().print();
		}
	}

}
